import arcade

SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600

def draw_grass():
    arcade.draw_lrtb_rectangle_filled(0, SCREEN_WIDTH, 200, 0, arcade.color.GREEN)
    arcade.draw_lrtb_rectangle_filled(0, SCREEN_WIDTH, SCREEN_HEIGHT, 200, arcade.color.CYAN)



def draw_tree(x, y):
    arcade.draw_rectangle_filled(70+x, 220, 20, 60, arcade.csscolor.SIENNA)
    arcade.draw_triangle_filled(70+x, 300, 40+x, 220, 100+x, 220, arcade.csscolor.DARK_GREEN)
    arcade.draw_rectangle_filled(100+x, 220-y, 20, 60, arcade.csscolor.SIENNA)
    arcade.draw_triangle_filled(100+x, 300-y, 70+x, 220-y, 130+x, 220-y, arcade.csscolor.DARK_GREEN)

def draw_bird(x,y):
    arcade.draw_arc_outline(150+x, 250+y, 40, 30, arcade.color.BLACK, 90, 180, 2, 1)
    arcade.draw_arc_outline(110+x, 250+y, 40, 30, arcade.color.BLACK, 0, 90, 2, 1)


def main():
    arcade.open_window(SCREEN_WIDTH, SCREEN_HEIGHT, "函数画图")
    arcade.start_render()

    draw_grass()
    draw_tree(0, 100)
    draw_tree(90, 100)
    draw_tree(180, 100)
    draw_tree(270, 100)
    draw_tree(360, 100)
    draw_tree(450, 100)
    draw_tree(540, 100)
    draw_tree(630, 100)
    draw_bird(0, 0)
    draw_bird(100, 150)
    draw_bird(300, 250)
    draw_bird(500, 100)
    draw_bird(0, 300)
    arcade.finish_render()
    arcade.run()

main()
